<?php

namespace App\Models\Member;

use App\Models\BaseModel;

class TotalBonusPool extends BaseModel
{
    protected $fillable = [
        'id', 'store_id', 'bonus_pool_one_sum',
        'team_month_sum', 'team_year_sum',
        'team_recommend', 'team_fund',
        'created_at', 'updated_at'
    ];

    public function getKeyText($key)
    {
        $str = [];
        switch ($key) {
            case 'bonus_pool_one_sum':
                $str['reason']= '虹包';
                $str['type']= 1;
                $str['deal_type']= 21;
                break;
            case 'team_month_sum':
                $str['reason']= '报单奖励';
                $str['type']= 2;
                $str['deal_type']= 22;
                break;
            case 'team_year_sum':
                $str['reason']= '分虹';
                $str['type']= 3;
                $str['deal_type']= 23;
                break;
            case 'team_recommend_sum':
                $str['reason']= '招商奖励';
                $str['type']= 4;
                $str['deal_type']= 24;
                break;
            case 'team_fund_sum':
                $str['reason']= '教育培训基金';
                $str['type']= 5;
                $str['deal_type']= 25;
                break;         
            default:
                # code...
                break;
        }
        return $str;
    }
}
